import { Container, Events } from "@/components/custom/index.tsx";
import { InputNumber, Icon } from '@arco-design/web-vue'
import { definitionNumber, definitionMonacoEditor } from '@/components/custom/incident'
import SvgIcon from '@/components/Svg/index.vue'
export default ({
    type: "form",
    label: "数字输入框",
    description: "数字输入框",
    hidden: false,
    isform: true, draggable: true,
    icon() {
        return <SvgIcon name="number"></SvgIcon>;
    },
    preview: () => {
        return <InputNumber style="width: 200px"></InputNumber>
    },
    render: (props: any, { }: Container) => {
        return <InputNumber style="width: 200px" {...props} ></InputNumber>
    }, props: {

        modelValue: definitionNumber({
            type: "string",
            label: "默认值",
            placeholder: "请输入内容",
            defaultValue: null,
        }),
    },
    events: {
        onClick: definitionMonacoEditor({
            type: "function",
            label: "点击事件",
            placeholder: "请输入内容",
            defaultValue: null,
        }),
        onChange: definitionMonacoEditor({
            type: "function",
            label: "值改变事件",
            placeholder: "请输入内容",
            defaultValue: null,
        }),
        onInput: definitionMonacoEditor({
            type: "function",
            label: "输入事件",
            placeholder: "请输入内容",
            defaultValue: null,
        }),
        onFocus: definitionMonacoEditor({
            type: "function",
            label: "获取焦点事件",
            placeholder: "请输入内容",
            defaultValue: null,
        }),
        onBlur: definitionMonacoEditor({
            type: "function",
            label: "失去焦点事件",
            placeholder: "请输入内容",
            defaultValue: null,
        }),
        onClear: definitionMonacoEditor({
            type: "function",
            label: "清除事件",
            placeholder: "请输入内容",
            defaultValue: null,
        }),
        onPressEnter: definitionMonacoEditor({
            type: "function",
            label: "回车事件",
            placeholder: "请输入内容",
            defaultValue: null,
        })
    }
}) as Container